import request from '@/utils/request';

// 商品品类列表
export async function getCategoryList(params: any) {
  return request('/api/platform/getCategoryList', {
    method: 'GET',
    params,
  });
}

// 添加商品品类
export async function createCategory(data: any) {
  return request('/api/platform/createCategory', {
    method: 'POST',
    data,
  });
}

// 修改商品品类
export async function updateCategory(data: any) {
  return request('/api/platform/updateCategory', {
    method: 'POST',
    data,
  });
}

// 删除商品品类
export async function deleteCategory(params: any) {
  return request('/api/platform/deleteCategory', {
    method: 'GET',
    params,
  });
}

// 修改商品品类状态
export async function changeCategoryStatus(params: any) {
  return request('/api/platform/changeCategoryStatus', {
    method: 'GET',
    params,
  });
}

// 排序
export async function setSort(params: any) {
  return request('/api/platform/setSort', {
    method: 'GET',
    params,
  });
}

// 获取渠道
export async function getShowPlts(params: any) {
  return request('/api/backend/getShowPlts', {
    method: 'GET',
    params,
  });
}


// 获取渠道统计数量
export async function getPltCateCount(params: any) {
  return request('/api/backend/getPltCateCount', {
    method: 'GET',
    params,
  });
}
